import Storage from "@/store/storage";

export default {
  namespaced: true,
  state: {
    token: '',
    username: '',
    realname: '',
    userInfo: {}
  },
  mutations: {
    setToken: (state: any, token: any) => {
      state.token = token;
      Storage.setToken(token);
    },
    setUserInfo: (state: any, userInfo: any) => {
      state.userInfo = userInfo;
      state.username = userInfo?.username
      state.realname = userInfo?.realname
    },
  },
  actions: {}
};
